<template>
  <span>name:{{ name }}</span>
  <span>age:{{ age }}</span>
  <img alt="Vue logo" src="./assets/logo.png" />
</template>
<script setup lang="ts">
import { reactive, toRefs } from 'vue'
//定义ts校验
interface dataform {
  name: string
  age: number
}
const data: dataform = reactive({
  name: '张三',
  age: 18
})
const { name, age } = toRefs(data)
</script>
<style>
#app {
  margin-top: 60px;
  font-family: Avenir, Helvetica, Arial, sans-serif;
  color: #2c3e50;
  text-align: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
</style>
